//
//  ALNetUtil.m
//  fuqinProject
//
//  Created by hcs on 2018/10/9.
//  Copyright © 2018年 al. All rights reserved.
//

#import "ALNetUtil.h"
#import "ALLog.h"

@implementation ALNetUtil
+ (NSString *)getValidatTimeKeyString {
    double da = [NSDate date].timeIntervalSince1970 * 1000;
    NSArray *numArr = @[@"0",@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"A",@"B",@"C",@"D",@"E",@"F",@"G",@"H",@"I",@"J",@"K",@"L",@"M",@"N",@"O",@"P",@"Q",@"R",@"S",@"T",@"U",@"V"];
    NSMutableString *str = [NSMutableString string];
    while (da) {
        [str insertString:numArr[(unsigned long)da % 32] atIndex:0];
        da /= 32;
        if (da < 32) {
            [str insertString:numArr[(unsigned long)da] atIndex:0];
            break;
        }
    }
    if (!str.length) {
        LogE(@"getValidatTimeKeyString Error");
    }
    return str;
}
@end
